<template>
  <div>
    <publicPageVue v-if="Object.keys(pageSetting).length > 0" :column-list="columnList" :json-obj="pageSetting" name="User" :tables="tables" />
  </div>
</template>
<script>
  import { Mixin } from '@/common/minxin/Mixin'
  import { GFCD } from '@/utils/utils'
  import publicPageVue from '../../components/publicPage.vue'
  import User from '../../components/json/User'
  import { translateTitle } from '@/utils/i18n'
  export default {
    name: 'User',
    components: { publicPageVue },
    mixins: [Mixin],
    data() {
      return {
        tables: {
          tableList: [],
          count: 0,
          pageSize: 50,
          limit: 1,
          name: 'User',
          operation: false,
          isNew: true,
          btns: [
            { name: translateTitle('Dams.DamsSystemManagement.启用'), key: 'startUsing' },
            // { name: '启用', key: 'startUsing' },
            { name: translateTitle('Dams.DamsSystemManagement.密码重置'), key: 'pswReset' },
            { name: '密码修改', key: 'pswAmend' },
          ],
          width: '350',
        },
        pageSetting: {},
        columnList: [
          { porp: 'USER_NAME', label: translateTitle('Dams.DamsSystemManagement.用户名称') },
          { porp: 'USER_ID', label: translateTitle('Dams.DamsSystemManagement.账号') },
          { porp: 'USER_TEL', label: translateTitle('Dams.DamsSystemManagement.用户电话') },
          { porp: 'REMARK', label: translateTitle('Dams.DamsSystemManagement.用户说明') },
          { porp: 'AVAILABLE', label: translateTitle('Dams.DamsSystemManagement.用户可用') },
          { porp: 'ACTIVE_FLAG', label: translateTitle('Dams.DamsSystemManagement.用户是否启用') },
        ],
      }
    },
    created() {
      this.init()
    },
    methods: {
      init() {
        this.configSetting = GFCD('dams')
        // this.nowJsonData().then((data) => {
        this.pageSetting = User
        // })
      },
    },
  }
</script>
